<?php

namespace JLPay\Models\Openmerch\Change;

use JLPay\Models\BaseRequest;

/**
 * 签约信息修改请求
 */
class SignInfoModifyRequest extends BaseRequest
{
    public const API_URL = '/open/merch/access/sign-info/modify';
    
    protected string $orgNo = '';  // 机构号
    protected string $merchNo = '';  // 商户号
    protected string $applyId = '';  // 申请单号
    protected string $signMode = '';  // 签约方式
    protected string $agreementPic = '';  // 纸质协议照片
    protected string $legalPersonPhone = '';  // 法人签约手机号码
    protected string $delegateePhone = '';  // 授权收款人签约手机号码

    /**
     * 设置机构号
     *
     * @param string $orgNo
     * @return self
     */
    public function setOrgNo(string $orgNo): self
    {
        $this->orgNo = $orgNo;
        return $this;
    }

    /**
     * 设置商户号
     *
     * @param string $merchNo
     * @return self
     */
    public function setMerchNo(string $merchNo): self
    {
        $this->merchNo = $merchNo;
        return $this;
    }

    /**
     * 设置申请单号
     *
     * @param string $applyId
     * @return self
     */
    public function setApplyId(string $applyId): self
    {
        $this->applyId = $applyId;
        return $this;
    }

    /**
     * 设置签约方式
     *
     * @param string $signMode
     * @return self
     */
    public function setSignMode(string $signMode): self
    {
        $this->signMode = $signMode;
        return $this;
    }

    /**
     * 设置纸质协议照片
     *
     * @param string $agreementPic
     * @return self
     */
    public function setAgreementPic(string $agreementPic): self
    {
        $this->agreementPic = $agreementPic;
        return $this;
    }

    /**
     * 设置法人签约手机号码
     *
     * @param string $legalPersonPhone
     * @return self
     */
    public function setLegalPersonPhone(string $legalPersonPhone): self
    {
        $this->legalPersonPhone = $legalPersonPhone;
        return $this;
    }

    /**
     * 设置授权收款人签约手机号码
     *
     * @param string $delegateePhone
     * @return self
     */
    public function setDelegateePhone(string $delegateePhone): self
    {
        $this->delegateePhone = $delegateePhone;
        return $this;
    }

    /**
     * 转换为数组
     *
     * @return array
     */
    public function toArray(): array
    {
        $data = parent::toArray();
        $data['org_no'] = $this->orgNo;
        $data['merch_no'] = $this->merchNo;
        $data['apply_id'] = $this->applyId;
        $data['sign_mode'] = $this->signMode;
        $data['agreement_pic'] = $this->agreementPic;
        $data['legal_person_phone'] = $this->legalPersonPhone;
        $data['delegatee_phone'] = $this->delegateePhone;
        return $data;
    }
} 